﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Practices.Prism.ViewModel;

namespace VideoPlay.PhoneClient.ViewModels
{
    public class IndicatorViewModel : NotificationObject, IDisposable
    {
        private bool disposed;

        private bool isBusy = false;
        public bool IsBusy
        {
            get { return isBusy; }
            set { isBusy = value; this.RaisePropertyChanged(() => this.IsBusy); }
        }

        private string indicatorDetails = string.Empty;
        public string IndicatorDetails
        {
            get { return indicatorDetails; }
            set { indicatorDetails = value; this.RaisePropertyChanged(() => this.IndicatorDetails); }
        }

        public void Show()
        {
            this.IsBusy = true;
            this.IndicatorDetails = "Loading...";
        }

        public void Hide()
        {
            this.IsBusy = false;
            this.IndicatorDetails = "";
        }

        public void LoadMoreShow()
        {
            this.IsBusy = true;
        }

        public void LoadMoreHide()
        {
            this.IsBusy = true;
        }

        public void Dispose()
        {
            this.Dispose(true);
            GC.SuppressFinalize(this);
        }

        protected virtual void Dispose(bool disposing)
        {
            if (this.disposed)
            {
                return;
            }

            if (disposing)
            {
                
            }

            this.disposed = true;
        }
    }
}
